<!DOCTYPE html>
<html>

<head>
  <title>图形编辑</title>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <!-- No-op until loaded dynamically (could make configurable) -->
  <link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
  <!-- STYLESHEETS (others loaded dynamically) -->
  <style id="styleoverrides" media="screen"></style>
  <link href="./svgedit.css" rel="stylesheet" media="all">
  </link>
  <!-- Lacking browser support -->
  <script type="module" src="./browser-not-supported.js"></script>
  <script type="module" src="./serveconfig.js"></script>
  <script type="module" src="./flexble.js"></script>
  <title>SVG-edit</title>
</head>
<!-- 测试修改 2 2 22222  4444 -->
<body style="margin:0">
  <div id="container" style="width:100%;height:100vh"></div>
</body>
 <!-- If you do not wish to add extensions by URL, you can add calls
      within the following file to svgEditor.setConfig -->
      <script type="module">
        function loadCssCode(code){
          var style = document.createElement('style');
          style.type = 'text/css';
          style.rel = 'stylesheet';
          style.id = 'svgeditorcss'
          //for Chrome Firefox Opera Safari
          style.appendChild(document.createTextNode(code));
          //for IE
          //style.styleSheet.cssText = code;
          var head = document.getElementsByTagName('head')[0];
          head.appendChild(style);
        }

        window.urlType = 'GraphicEditing';
      
       

        import Editor from './Editor.js'
/* for available options see the file `docs/tutorials/ConfigOptions.md */

window.showType = "pictool"
const svgEditor = new Editor(document.getElementById('container'))
loadCssCode('.svg_editor{grid-template-rows: auto 15px 1fr 0px;}')



svgEditor.init();
  // 加载服务端配置
 
svgEditor.setConfig({
          serviceUrl:serviceUrl,
          canvasName: 'pictool',
          canvas_expansion: 1,
          dimensions: [2400,2400],
          allowInitialUserOverride: true,
          extensions: ['ext-cube','ext-link','ext-datatext','ext-echart','ext-piechart','ext-gaugechart','ext-barechart','ext-arc','ext-table','ext-text','ext-barry','ext-gzpai','ext-server-opensave','ext-basic-shaps','ext-reportdata'],
          noDefaultExtensions: false,
          // userExtensions: [ { pathName: './react-extensions/react-test/dist/react-test.js' }]
        },{allowInitialUserOverride:true})


        

 
// Variable XDOMAIN below is created by Rollup for the Xdomain build (see rollup.config.js)
/* globals XDOMAIN */
try { // try clause to avoid js to complain if XDOMAIN undefined
          if (XDOMAIN) {
            svgEditor.setConfig({
              canvasName: 'xdomain', // Namespace this
              allowedOrigins: [ '*' ]
            })
    console.info('xdomain config activated')
  }
        } catch (error) { /* empty fn */ }


        
     
        
        
      </script>
</html>
